const token_name = "loginToken"
const user_Info = "userInfo"
    // 存token
export function setToken(token) {
    window.localStorage.setItem(token_name, token)
}
// 存userInfo
export function setUser(obj) {
    window.localStorage.setItem(user_Info, JSON.stringify(obj))
}
// 获取token
export function getToken() {
    return window.localStorage.getItem(token_name)
}
// 获取用户信息
export function getUser() {
    return window.localStorage.getItem(user_Info)
}
// 删除token
export function removeToken() {
    return window.localStorage.removeItem(token_name)
}
// 删除用户
export function removeUser() {
    return window.localStorage.removeItem(user_Info)
}
//删除全部
// 全部删除
export function clearAll() {
    removeToken()
    removeUser()
}